<template>
  <div v-loading="$store.state.pageLoading" class="app-container dashboard-editor-container" element-loading-text="数据加载中...">
    <div style="padding-left:30px">
      <el-date-picker v-model="$store.state.singnTime.stratDate" :default-value="new Date()" style="width:200px" size="medium" type="datetime" placeholder="选择开始日期" value-format="yyyy-MM-dd HH:mm:ss" />
      <span>至</span>
      <el-date-picker v-model="$store.state.singnTime.endDate" :default-value="new Date()" style="width:200px" size="medium" type="datetime" placeholder="选择结束日期" value-format="yyyy-MM-dd HH:mm:ss" />
      <el-button type="primary" size="medium" icon="el-icon-search" @click="initFun()">搜索</el-button>
    </div>
    <p class="totla-num" style="text-align:right;padding-right:30px">
      <el-tag type="success">合计:{{ $store.state.singnList.num }}人报名</el-tag>
    </p>
    <el-row style="background:#fff;padding:16px 5px 0 ;margin-bottom:32px;">
      <line-chart v-if="$store.state.showSingnChart" :chart-data="$store.state.lineChartDataSingn" />
    </el-row>
  </div>
</template>

<script>
import { getSingnList } from "@/api/personnel";
import LineChart from "../../components/LineChart";

export default {
  components: { LineChart },
  created() {
    this.initFun();
  },
  methods: {
    async initFun() {
      this.$store.state.pageLoading = true;
      let res = await getSingnList();
      this.$store.state.pageLoading = false;
    }
  }
};
</script>
